import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

import router, { initIndex } from "./router"
import pinia from './pinna'
import { useSysStore } from './pinna/sys'


const app = createApp(App);
app.use(pinia)

initIndex().then(() => {
    app.use(router)
    app.mount('#app')
}).catch(()=>{
    app.use(router)
    app.mount('#app')
})

ElMessage({
    message: "系统加载完毕！",
    grouping: false,
    type: 'success'
}
);

document.title = useSysStore().getTitle